#ifndef MAGE_H
#define MAGE_H

#include "movingobject.h"
#include "wrappers/arrays.h"
#include <external/iunit.h>

class SelfControl;

class Mage : public MovingObject, public virtual IUnit
{
public:
    static const int MAX_HEALTH;
    static const int MAX_MANA;
    static const int START_HEALTH;
    static const int START_MANA;
    static const float SPEED_LIMIT;

    Mage();
    Mage(const vec2f &position, float direction = 0.0f);
    virtual ~Mage();

    void drink(const Potion &potion);

    /**
     * @brief damage
     * @param value - required damage (positive number)
     * @return the real damage done
     */
    int damage(int value);

    int health() const;
    int mana() const;

    const IEffectsArray *effects() const;

    void accept(const SelfControl *self);
    void accept(ISceneObjectVisitor *visitor);

private:
    void init();

    EffectsArray _effects;
    int _health;
    int _mana;
};

#endif // MAGE_H
